/**
 * 
 */
package cn.edu.gxnu.dsa.lab;

/**
 * @author Zhiyong
 *
 */
public class Student {
	private String stuNr;
	private String name;
	private String sex;
	private String telNr;
	private String address;

	public Student(String stuNr, String name, String sex, String telNr, String address) {
		super();
		this.stuNr = stuNr;
		this.name = name;
		this.sex = sex;
		this.telNr = telNr;
		this.address = address;
	}

	public String getStuNr() {
		return stuNr;
	}

	public void setStuNr(String stuNr) {
		this.stuNr = stuNr;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getTelNr() {
		return telNr;
	}

	public void setTelNr(String telNum) {
		this.telNr = telNum;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public void display(int opCode) {
		if (opCode == 0) {
			System.out.println("+----------------------------------------------------------------------------------------------------------+");
			System.out.println("| Student Number\t| Student Name\t| Sex | Phone Number\t| Address                                  |");
			System.out.println("+----------------------------------------------------------------------------------------------------------+");
		}
		System.out.println("| " + this.getStuNr() + "\t\t|" + " " + this.getName() + "\t|" + "  " + this.getSex() + "  |"
				+ " " + this.getTelNr() + "\t|" + " " + this.getAddress());
	}

}
